<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>慕课论坛</title>
    <link rel="stylesheet" href="/luntan/public/static/static/css/all-df86af5803.css">
</head>
<body class="forum" data-page="forum">
<div class="header">
    <nav class="navbar navbar-inverse navbar-fixed-top navbar-default">
        <div class="container">
            <div class="navbar-header" id="navbar-header">
                <a href="/luntan/public/index.php/index/index/shouye.html" class="navbar-brand">
                    <img src="/luntan/public/static/images/logo.png">
                </a>
            </div>
            <div id="main-nav-menu">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="/luntan/public/index.php/index/index/shouye.html">
                        <i class="fa fa-home"></i>
                        <span class="hidden-xs hidden-sm">首页</span></a></li>
                    <li class="hidden-sm hidden-xs"><a href="/luntan/public/index.php/index/index/thread.html"><i class="fa fa-comments-o"></i> 话题</a></li>

                </ul>
            </div>

            <ul class="nav navbar-nav navbar-right">
                <li class="nav-search hidden-xs hidden-sm">
                    <form method="GET" action="/luntan/public/index.php/index/index/post.html" accept-charset="UTF-8" class="navbar-form form-search active" target="_blank">
                        <div class="form-group">
                            <input placeholder="搜索" class="form-control" name="title" type="text">
                            <input type="submit" value="搜索">
                        </div>
                        <i class="fa fa-search"></i>
                    </form>
                </li>
                {if condition="$user"}
                <li id="signup-btn1"><a href="/luntan/public/index.php/index/index/my">{$user}</a></li>
                <li id="login-btn1"><a href="/luntan/public/index.php/index/index/tuichu">退出</a></li>
                {else}
                <li><a href="/luntan/public/index.php/index/index/zhuce.html" id="signup-btn">注册</a></li>
                <li><a href="/luntan/public/index.php/index/index/denglu.html" id="login-btn">登录</a></li>
                {/if}
            </ul>
        </div>
    </nav>
</div>
<div id="main" class="main-container container">
    <!-- 首页通栏(4个推荐位) -->
    <div class="col-md-9 threads-index main-col">
        <div class="panel panel-default">

            <div class="panel-heading">
                <div class="pull-left hidden-sm hidden-xs">
                    <i class="fa fa-list"></i> 首页
                </div>
                <ul class="pull-right list-inline remove-margin-bottom thread-filter">
                    <li>
                        <a href="/luntan/public/index.php/index/index/shouye.html">
                            <i class="fa fa-history"></i> 最新话题
                        </a>
                    </li>
                    <li>
                        <a href="/luntan/public/index.php/index/index/hui.html">
                            <i class="fa fa-diamond"> </i> 优质帖子
                        </a>
                    </li>
                    <li>
                        <a href="/luntan/public/index.php/index/index/zan" >
                            <i class="fa fa-thumbs-o-up"> </i> 最多按赞
                        </a>
                    </li>
                    <li><a href="/luntan/public/index.php/index/index/myhui">
                        <i class="fa fa-diamond"> </i> 等待回复
                    </a></li>
                </ul>
                <div class="clearfix"></div>
            </div>


            <div class="panel-body remove-padding-horizontal">
                <ul class="list-group row thread-list">

                    {foreach $liebiao as $tiezi}
                    <li class="list-group-item media " style="margin-top: 0px;">
                        <a class="pull-right" href="/luntan/public/index.php/index/index/post.html?id={$tiezi['id']}">
                            <span class="badge badge-reply-count"> {$tiezi['weihuifu']}</span>
                        </a>
                        <div class="avatar pull-left">
                            <a href="/luntan/public/index.php/index/index/post.html?id={$tiezi['id']}">
                                <img class="media-object img-thumbnail avatar-48" alt="imooc" src="/luntan/public/static/images/{$tiezi['image']}"/>
                            </a>
                        </div>
                        <div class="infos">
                            <div class="media-heading">
                                <i class="fa fa-thumb-tack text-danger"></i>
                                <a href="/luntan/public/index.php/index/index/post.html?id={$tiezi['id']}" title="imooc 接下来需要完善的功能">
                                    {$tiezi['title']}
                                </a>
                            </div>
                            <div class="media-body meta">
                                <a href="/luntan/public/index.php/index/index/post.html?id={$tiezi['id']}">
                                    <span class="fa fa-thumbs-o-up">{$tiezi['zanshu']}</span>
                                </a>
                                <span> • </span>

                                <a href="/luntan/public/index.php/index/index/thread">
                                   话题分类
                                </a>
                                <span> • </span>
                                <!-- <span> • </span> -->
                                <span class="tag-list hidden-xs">
                                <a href="/luntan/public/index.php/index/index/tag.html">
                                    <span class="tag">tag</span>
                                </a>
                                    <span> • {$tiezi['tag_id']}</span>
                                </span>
                                <span>回复 •{$tiezi['rsum']}
                                </span>
                                <a href="/luntan/public/index.php/index/index/post.html?id={$tiezi['id']}">
                                    用户名
                                    <span> • {$tiezi['user_id']}</span>
                                </a>
                                <span class="timeago " data-toggle="tooltip" data-placement="top" title="2017-02-08 21:47:25">
                                    时间·{$tiezi['create_at']}
                                </span>
                            </div>
                        </div>
                    </li>
                    {/foreach}
                </ul>
            </div>
            <div class="panel-footer text-right remove-padding-horizontal pager-footer">
                <!-- Pager -->
                <ul class="pagination">
                    {if condition="$fenye['yema']!=1"}
                    <li class="disable">
                        <a href="/luntan/public/index.php/index/index/{$type}?yema=1">
                        <span>首页</span>
                        </a>
                    </li>
                    <li class="disable">
                        <a href="/luntan/public/index.php/index/index/{$type}?yema=<?php echo ($fenye['yema']-1);?>">
                            <span>上一页</span>
                        </a>
                    </li>
                    {/if}


                    <?php
                    for($i=1;$i<$fenye['yeshu']+1;$i++)
                    {
                    ?>
                    <li class="active">
                        <a href="/luntan/public/index.php/index/index/{$type}?yema=<?php echo $i;?>">
                            <span><?php echo $i; ?></span>
                        </a>
                    </li>
                    <?php
                    }
                    ?>
                    {if condition="$fenye['yema']!=$fenye['yeshu']"}
                    <li class="disable">
                        <a href="/luntan/public/index.php/index/index/{$type}?yema=<?php echo ($fenye['yema']+1);?>">
                            <span>下一页</span>
                        </a>
                    </li>
                    <li><a href="/luntan/public/index.php/index/index/{$type}?yema=<?php echo $fenye['yeshu'];?>" rel="next">最后一页
                    {/if}
                    </a>
                    </li>
                </ul>
            </div>


        </div>
    </div>

    <div class="col-md-3 side-bar">
        <div class="panel panel-default corner-radius">
            <div class="panel-heading">
                <h3 class="panel-title">BBS</h3>
            </div>
            {if condition="$user"}
            <div class="panel-heading"><a href="/luntan/public/index.php/index/index/fatie">发表新帖</a></div>
            {else}
            <div class="panel-body text-center">
                <a href="/luntan/public/index.php/index/index/zhuce.html" class="btn btn-primary">
                    <i class="fa fa-user"> </i> 注册
                </a>
            </div>
            <div class="panel-footer text-center">
                已注册用户请 <a href="/luntan/public/index.php/index/index/denglu.html">登录</a>
            </div>
            {/if}

        </div>

        <div class="panel panel-default corner-radius">
            <div class="panel-heading">
                <h3 class="panel-title">热门标签</h3>
            </div>
            <div class="panel-body">
                <div class="badge badge-tag-cloud">
                    <a href="/luntan/public/index.php/index/index/tag.html">{$hot_tag_name}</a>
                    ({$hot_tag_tiaoshu})
                </div>
            </div>
        </div>
        <div class="panel panel-default corner-radius">
            <div class="panel-heading">
                <h3 class="panel-title">小贴士</h3>
            </div>
            <div class="panel-body">
                猪有猪的思想，人有人的思想。如果猪有人的思想，那它就不是猪了——是八戒!
            </div>
        </div>
        <div class="panel panel-default corner-radius">
            <div class="panel-heading">
                <h3 class="panel-title">统计信息</h3>
            </div>
            <ul class="list-group">
                <li class="list-group-item">社区会员:{$usersum}</li>
                <li class="list-group-item">社区发帖数:{$tiezisum}</li>
                <li class="list-group-item">主题数: {$tagsum}</li>
                <li class="list-group-item">回帖数: {$replysum}</li>
            </ul>
        </div>


    </div>
    <div class="clearfix"></div>

</div>

<footer class="footer">
    <div class="container">
        <div class="copyright">
            <blockquote class="pull-left">
                <p>慕课论坛</p>
                <p>Copyright &copy; 2015-2016 <a href="shouye.html">imooc</a> 1.0.0-rc2 <span class="pipe">|</span><span class="pipe">|</span></p>
            </blockquote>
        </div>
        <div class="pull-right hidden-sm hidden-xs">
            <p>
                <a href="###">关于我们</a>
                <span class="pipe">|</span>
                <a href="###">联系我们</a>
                <span class="pipe">|</span>
                <a href="###">常见问题解答</a>
            </p>
            <p>
                <a href="/luntan/public/index.php/index/index/shouye.html" target="_blank":>
                    <img src="/luntan/public/static/images/imooc-logo.png" border="0" height="40" data-toggle="tooltip" data-placement="top" title="Powered by imooc"/>
                </a>
            </p>
        </div>
    </div>
</footer>
</body>
</html>